<template>
  <div class="app" >
    <person-v3 v-if="show"></person-v3>
    <button @click="show = !show">切换</button>
  </div>
</template>

<script lang="ts" setup name="App">
import personV3 from "@/components/PersonV3.vue";
import { ref,onMounted } from 'vue';
const show = ref(true)
onMounted(() => {
  console.log('父---------挂载后')
})

</script>

<style scoped>
.app {
  background-color: gray;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
</style>